home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
138
/
138.xpi
/
chrome
/
stumbleupon.jar
/
content
/
uninstallDialog.xul
< prev
next >
Wrap
Extensible Markup Language
|
2009-05-22
|
4KB
|
153 lines
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://stumbleupon/locale/stumbleupon.dtd" >
<dialog id="stumble_signin_dialog" title="StumbleUpon Uninstall Options"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons="accept"
ondialogaccept="return doOK();"
onload="init()">
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_stumble" src="chrome://stumbleupon/locale/stumbleupon.properties"/>
</stringbundleset>
<script type="application/x-javascript">
<![CDATA[
var detail;
var logout;
var remove_data;
//var delete_account;
function init()
{
detail = window.arguments[0];
logout = document.getElementById("logout");
remove_data = document.getElementById("remove-data");
// delete_account = document.getElementById("delete-account");
var logout_warning = document.getElementById("logout-warning");
var label_color = document.defaultView.getComputedStyle(logout_warning, "").getPropertyValue("color");
if (opener.stumbleid != 0)
{
var id_str = opener.su_ds.getValue("$nick");
id_str = (id_str == "") ? opener.stumbleid.toString() : id_str;
logout.label = "Sign out from account '" + id_str + "'.";
logout.hidden = false;
document.getElementById("logout-warning").hidden = false;
// delete_account.label = "Schedule account '" + id_str + "' to be deleted.";
// delete_account.hidden = false;
}
var uninstall = document.getElementById("uninstall");
setCheckboxLabelColor(uninstall, label_color);
logout.checked = detail.logout;
logout.setAttribute("checked-preferred", detail.logout);
setCheckboxLabelColor(logout, label_color);
remove_data.checked = detail.remove_data;
remove_data.setAttribute("checked-preferred", detail.remove_data);
setCheckboxLabelColor(remove_data, label_color);
// delete_account.checked = detail.delete_account;
// delete_account.setAttribute("checked-preferred", detail.delete_account);
refresh();
}
function setCheckboxLabelColor(element, color)
{
var label = document.getAnonymousElementByAttribute(element, "class", "checkbox-label");
label.setAttribute("style", "color: " + color + ";");
}
function refresh()
{
var logout = document.getElementById("logout");
var remove_data = document.getElementById("remove-data");
// var delete_account = document.getElementById("delete-account");
// if (delete_account.checked)
// {
// remove_data.checked = true;
// remove_data.disabled = true;
// }
// else
// {
remove_data.disabled = false;
remove_data.checked = (remove_data.getAttribute("checked-preferred") == "true");
// }
if (remove_data.checked)
{
logout.checked = true;
logout.disabled = true;
}
else
{
logout.disabled = false;
logout.checked = (logout.getAttribute("checked-preferred") == "true");
}
}
function handle_checkbox_command(element)
{
element.setAttribute("checked-preferred", element.checked);
refresh();
}
function doOK()
{
detail.logout = logout.checked;
detail.remove_data = remove_data.checked;
// detail.delete_account = delete_account.checked;
return true;
}
]]>
</script>
<vbox style="margin:5px">
<groupbox>
<caption label="Uninstall Options"/>
<checkbox id="uninstall"
label="Uninstall the StumbleUpon Toolbar extension."
disabled="true"
checked="true"/>
<hbox>
<checkbox id="logout"
checked="false"
hidden="true"
oncommand="handle_checkbox_command(this);"/>
<spacer flex="1"/>
</hbox>
<label id="logout-warning"
value="WARNING: If you don't know your password, you will LOSE THIS ACCOUNT."
style="margin-left: 28px;"
hidden="true"/>
<hbox>
<checkbox id="remove-data"
label="Remove all configuration files."
checked="false"
oncommand="handle_checkbox_command(this);"/>
<spacer flex="1"/>
</hbox>
<!--
<hbox>
<checkbox id="delete-account"
checked="false"
hidden="true"
oncommand="handle_checkbox_command(this);"/>
<spacer flex="1"/>
</hbox>
-->
</groupbox>
</vbox>
</dialog>